package SPAN::Method::NonLinearEquation::Secant;

use warnings;
use strict;
use Math::Calculus::Secant;
use Reaction::Class;

use Reaction::Types::Core;
use SPAN::Types::Math::Calculus;

class Secant is 'SPAN::Method', which {

    implements backend      => as {'Math::Calculus::Secant'};
    implements display_name => as {'Secant'};

    has expression => (
        isa => 'Expression',
        is  => 'rw',
        set_or_lazy_fail('expression')
    );

    has variable => (
        isa => 'Variable',
        is  => 'rw',
        set_or_lazy_fail('variable')
    );

    has precision =>
        ( isa => 'PositiveInt', is => 'rw', set_or_lazy_fail('precision') );
    has xzero => ( isa => 'Real', is => 'rw', set_or_lazy_fail('xzero') );
    has xone  => ( isa => 'Real', is => 'rw', set_or_lazy_fail('xtwo') );

};

1;
